CC=g++
OBJS=main.o game.o map.o cell.o character.o player.o
LINK_OPTS=-lcurses
COMPILE_OPTS=-c
EXE_NAME=camo


all: $(OBJS)
		$(CC) $(LINK_OPTS) -o $(EXE_NAME) $(OBJS)

main.o: main.cpp game.h
	$(CC) $(COMPILE_OPTS) main.cpp

game.o: game.cpp game.h map.h player.h character.h
		$(CC) $(COMPILE_OPTS) game.cpp

map.o: map.cpp map.h cell.h
		$(CC) $(COMPILE_OPTS) map.cpp

cell.o: cell.cpp cell.h
		$(CC) $(COMPILE_OPTS) cell.cpp

character.o: character.cpp character.h
		$(CC) $(COMPILE_OPTS) character.cpp

player.o: player.cpp player.h character.h
		$(CC) $(COMPILE_OPTS) player.cpp

clean:
		rm -rf *.o $(EXE_NAME)
